using GraphQL.Types;
using GraphQLDemo.Api.GroupTypes;

namespace GraphQLDemo.Api.Extensions
{
    public class QuerySchema : Schema
    {
        private IServiceProvider _services;
            
        public QuerySchema(IServiceProvider serviceProvider) : base(serviceProvider)
        {
            _services = serviceProvider;
            Query = serviceProvider.GetService<QueryGraphType>();
        }

        protected override SchemaTypes CreateSchemaTypes()
        {
            var schemaTypes = new SchemaTypes(this, _services);
            return schemaTypes;
        }
    }
}
